package com.yiwyn.lifecycle.eg;

import org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory;
import org.springframework.beans.factory.support.MergedBeanDefinitionPostProcessor;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.stereotype.Component;

import java.lang.reflect.Method;


/**
 * 创建bean的生命周期 {@link AbstractAutowireCapableBeanFactory#createBean(String, RootBeanDefinition, Object[])}
 * postProcessMergedBeanDefinition回调接口是在MergeBeanDefintion和实例化之后进行的调用，
 * 目的是为了对合并后的BeanDefintion进行后置处理
 */
//@Component
public class TestBeanDefinitionPostProcessor implements MergedBeanDefinitionPostProcessor {

    /**
     * spring
     *
     * @param beanDefinition the merged bean definition for the bean
     * @param beanType       the actual type of the managed bean instance
     * @param beanName       the name of the bean
     */
    @Override
    public void postProcessMergedBeanDefinition(RootBeanDefinition beanDefinition, Class<?> beanType, String beanName) {

    }
}
